<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no"/>
  <title>评议表</title>
  <link rel="stylesheet" type="text/css" href="/wxpayhongbao/Public/Home/css/mobile-reset.css">
  <link rel="stylesheet" type="text/css" href="/wxpayhongbao/Public/Home/css/question.css">
  <script type="text/javascript" src="/wxpayhongbao/Public/Home/js/base.js"></script>
</head>
<body>
  <header>机关评价表(第一组)</header>
  <div>
    <h3 class="title"><?php echo ($question["title"]); ?></h5>
    <h5 class="type">公安分局</h5>
    <div class="chioces_container">
      <ul>
      	<?php if(is_array($question["choices"])): $i = 0; $__LIST__ = $question["choices"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li><?php echo ($vo); ?></li><?php endforeach; endif; else: echo "" ;endif; ?>
      </ul>
    </div>
    <div class="fixed">
      <div class="content">
        <h6>公安分局介绍</h6>
        <p class="introduct"></p>
        <div id="button">继续</div>
      </div>
    </div>
    <div class="list-container">
      <div class="list-content">
        <div class="show-all-container">
          <i class="show-all"></i>
          <div class="list-num">
            <span>12</span>
            <span>/</span>
            <span>26</span>
          </div>
        </div>
        <ul class="list-type clearfix">
          <li class="active-type">公安局</li>
          <li data-id='13'>林业局</li>
          <li data-id='14'>卫生局</li>
          <li data-id='15'>渔业局</li>
          <li data-id='16'>交通局</li>
          <li data-id='17'>民航局</li>
          <li data-id='18'>公安局</li>
          <li data-id='19'>林业局</li>
          <li data-id='20'>卫生局</li>
          <li>渔业局</li>
          <li>交通局</li>
          <li>民航局</li>
          <li>卫生局</li>
          <li>渔业局</li>
          <li>交通局</li>
          <li>民航局</li>
        </ul>
      </div>
    </div>
  </div>
  <footer class="footer">
    <i class="show-all"></i>
    <div class="list">
      <span>12</span>
      <span>/</span>
      <span>26</span>
    </div>
  </footer>
</body>
<script type="text/javascript" src="/wxpayhongbao/Public/Home/js/Zepto.min.js"></script>
<script type="text/javascript">
$(function(){
    var object = {
        onContinue:function(){
            $('.content').removeClass('bounceInDown');
            $('.fixed').hide();
        },
		onChiocs:function(){
            $(this).addClass('active').siblings().removeClass('active');
            if ($(this).text()=='不了解') {
                $(this).removeClass('active');
                $('.fixed').show();
                $('.content').html('<h6>公安分局介绍</h6><p class="introduct">近年来，建邺区深入推进公共法律服务的工作体系建设，努力编织横向到边、纵向到底的公共法律服务工作网，更好的为推进科学发展、保障改善民生、维护社会公平</p><div id="button">继续</div>').addClass('bounceInDown');
            $('#button').unbind().click(object.onContinue);
            }else if ($(this).text()=='不满意') {
                $('.fixed').show();
                $(this).removeClass('active');
                $('.content').html('<h6>不满意原因</h6><i id="cancle"></i><div class="discontent" contenteditable="true" placeholder="请输入文字"></div><div id="button">提交</div>').addClass('bounceInDown');
                $('#cancle').unbind().click(object.onContinue);
                $('#button').unbind().click(function(){
                $('.content').removeClass('bounceInDown');
                $('.fixed').hide();        
            });
            }else if ($(this).text()=='满意') {
                location.href="appraise.html";
            }            
        }
    }
    // 点击选项弹出对应的对应的提示
    $('.chioces_container li').click(object.onChiocs);
    $('.show-all,.list-content').click(function(e){
        e.stopPropagation();
        $('.list-container').show();
  //      $('.list-content').addClass('bounceInDown');
    });
    $('.list-container').click(function(){
        $('.list-container').hide();
        $('.list-content').removeClass('bounceInDown');
    })
    $('.list-type li').click(function(e){
        e.stopPropagation();
		var id=$(this).attr('data-id');
		$.ajax({
			url:'<?php echo U("getQuestion");?>',
			type:'post',
			dataType:'json',
			data:{
				id:id
			},
			success:function(json){
				$('.list-container').hide();
				var html='<ul>';
				$.each(json.data.choices,function(index,value){
					html+='<li>'+value+'</li>';
				});
				html+="</ul>";
				$(".title").text(json.data.title);
				$(".chioces_container").html(html);
				$('.chioces_container li').click(object.onChiocs);
			},
			Error:function(e){
				
			}
		});
        $(this).addClass('active-type').siblings().removeClass('active-type');
    })
})
</script>
</html>